<template>
	<div>
		{{ message }}
		{{ name }}
	</div>
	<button @click="change">改变标题</button>
	<grandSon />
</template>

<script setup lang="ts">
import grandSon from '../components/grandson.vue'
const name = ref('小小')
const props = defineProps({
	message: String,
})
const emit = defineEmits(['change'])
const change = () => {
	emit('change', '我是你爸爸')
}
console.log(props.message)
defineExpose({ name })
</script>

<style scoped></style>
